package com.easy.stock.util;

import java.text.SimpleDateFormat;
import java.util.regex.Pattern;

public class Constants {
	
	public static ThreadLocal<SimpleDateFormat> SDF = new ThreadLocal<SimpleDateFormat>() {
		protected SimpleDateFormat initialValue() {
		    return new SimpleDateFormat("yyyyMMdd");
		}
	};

	public static String LINE_SEP = System.getProperty("line.separator");
	
	public static Pattern CHINESE_PTN = Pattern.compile("[\u4e00-\u9fa5]+");
	public static Pattern CHAR_PTN = Pattern.compile("[a-zA-Z]+");
	public static Pattern NUM_PTN = Pattern.compile("[0-9]+");
	public static Pattern CHAR_NUM_PTN = Pattern.compile("[0-9a-zA-Z]+");
	
	public static final String CTRL_A = "\u0001";
	public static final String CTRL_B = "\u0002";
	public static final String CTRL_C = "\u0003";
	
	
	public static final int ERROR = -2;
	public static final int INVALID_ARGS = -1;
	public static final int SUCCESS = 0;
	
	public static final String STOCKTWIS = "st";
	public static final String TWITTER = "tw";
	public static final String SEEKING_ALPHA="sa";
	public static final String THE_STREET = "ts";
	
}
